<?php
   
   define('ACC',true);
   require_once('../include/init.php');

   $good = new goodModel();

   // print_r($_GET);

  $limit = 10;
  $page = isset($_GET['page'])?$_GET['page']+0:1;  //分页第几页
  if($page < 1){
     $page = 1;
  }

 $start = ($page-1) * $limit;

  if(isset($_GET['list'])){
        //回收站商品列表
       $datas = $good->getTrash();
       $page = new PageTool(count($datas),$limit,$page);
       $show = $page->show();
       $data = $good->getTrash($limit,$start);
  }else{
        //商品列表
       $datas = $good->getGoods();
       $page = new PageTool(count($datas),$limit,$page);
       $show = $page->show();
       $data = $good->getGoods($limit,$start);
  }



   require_once(ROOT . '/view/admin/templates/goodslist.html');



?>